#ifndef _KC_SSLCOMMON_H__KC_
#define _KC_SSLCOMMON_H__KC_

#include <openssl/ssl.h>
#include "../CommCommon.h"

namespace kc_sf
{
	// TODO obsluga sygnalu
	class SSLCommon : public CommCommon
	{
		public:

			SSLCommon( int sockfd, SSL *ssl, unsigned int max_line_length );

			CommResult sendData( const std::string &what, int timeout_s );
			CommResult recvData( std::string &to, const std::string &until_str, int timeout_s );
			CommResult recvData( std::string &to, int timeout_s, unsigned long how_many_bytes = -1 );

		private:

			int ssl_sockfd;
			SSL *ssl_ssl;
			unsigned int ssl_max_line_length;
	};
}

#endif // _KC_SSLCOMMON_H__KC_
